package db;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class DatabaseManager {
	ResultSet rs;
	Statement stm;
	DatabaseConfig databaseconfig;
	ConnectDatabase condb;
	Connection conn;
	public DatabaseManager() {
		databaseconfig=new DatabaseConfig();
	}
	void inti(){
		condb=new ConnectDatabase(databaseconfig);
		conn=condb.getConnection();
		try {
			stm=conn.createStatement();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	ResultSet getResultSet(String sql,boolean mok)	{
		ResultSet rs=null;
		try {
			rs = stm.executeQuery(sql);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
			return rs;
	}
	
}
